package com.yupi.usercenter.service;

import com.yupi.usercenter.model.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 *
 */
public interface UserService extends IService<User> {



    /**
     *注册
     * @param userAccount 账号
     * @param userPassword 密码
     * @param checkPassword 校验码
     * @return 新用户ID
     */
    long userRegister(String userAccount,String userPassword,String checkPassword,String planetCode);

    /**
     * 登录
     * @param userAccount
     * @param userPassword
     * @return 返回脱敏后的用户信息
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 脱敏方法
     * @param originUser
     * @return
     */
    User getSafetyUser(User originUser);


    /**
     *退出登录
     * @param request
     * @return
     */
    int userLogout(HttpServletRequest request);



}
